
#zmodal #dialog-new-rsc-tab {
    margin: -15px;
}

#dialog-new-rsc-tab {

    .new-find-cols {
        display: -ms-grid;
        -ms-grid-columns: 1fr 1fr;
        -ms-grid-rows: minmax(300px,70vh);

        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: minmax(300px,70vh);

        border-top: 1px solid @borderColorMediumTransparent;

        .modal-footer {
            position: -webkit-sticky;
            position: sticky;
            bottom: 0;
            background-color: rgba(255,255,255,0.8);
        }

        > .form-panel {
            -ms-grid-column: 2;
            -ms-grid-row: 1;
            grid-column: 2;
            grid-row: 1;

            background-color: white;
            padding: 10px 15px 0 15px;
            max-height: 100%;
            overflow-y: auto;
        }
        > .rsc-preview-panel-wrapper {
            -ms-grid-column: 2;
            -ms-grid-row: 1;
            grid-column: 2;
            grid-row: 1;

            position: relative;
            background-color: white;
            z-index: 1051;

            padding: 10px 15px 0 15px;
            max-height: 100%;
            overflow-y: auto;
            overflow-x: hidden;

            .rsc-preview {
                h1 {
                    font-size: @font-size-h3;
                }
                h2 {
                    font-size: @font-size-h4;
                }
                h3 {
                    font-size: @font-size-h4;
                }

                img {
                    max-width: 100%;
                    margin: 15px 0;
                }
            }

        }
        > .new-find-results {
            -ms-grid-column: 1;
            -ms-grid-row: 1;

            grid-column: 1;
            grid-row: 1;

            display: -ms-grid;
            -ms-grid-columns: 1fr;
            -ms-grid-rows: auto 1fr;

            display: grid;
            grid-template-columns: 1fr;
            grid-template-rows: auto 1fr;

            max-height: 100%;
            padding: 10px 0 0 14px;
            margin-left: 0;
            border-right: 1px solid @borderColorMediumTransparent;

            background: linear-gradient(to left, #f8f8f8, white, white);

            > .new-find-results-header {
                -ms-grid-column: 1;
                -ms-grid-row: 1;
                grid-column: 1;
                grid-row: 1;
                padding-right: 15px;
                padding-bottom: 10px;
            }

            > #dialog-rsc-new-found {
                -ms-grid-column: 1;
                -ms-grid-row: 2;
                grid-column: 1;
                grid-row: 2;

                max-height: 100%;
                padding-right: 15px;

                overflow-x: hidden;
                overflow-y: scroll;

                .item {
                    background-color: white;
                }
            }

            #dialog_new_rsc_results {
                margin-top: 0;
            }
        }

    }

}

#dialog_new_rsc_results {

    margin-top: 10px;

    // use smaller grid gutter
    @_item_gutter: 6px;

    .items {
        padding: 0;

        .item {
            @_padding: 5px;
            @_contentPartMargin: 0.25em;
            @_contentHeight: @thumbImageHeight;
            @_heigth: @_contentHeight + 2 * @_padding + 2px; // add border
            @_contentMargin: 1.5 * @_padding;
            @_fontSize: 12px;
            @_lineHeight: 1.1em;

            min-height: @_heigth;
            // max-height: @_heigth;
            overflow: hidden;
            border: 1px solid @borderColorMedium;
            border-radius: @border-radius-base;
            cursor: pointer;
            margin-bottom: 2 * @_item_gutter;
            padding: @_padding;
            font-size: @_fontSize;
            line-height: @_lineHeight;
            position: relative;
            transition-duration: 0;
            -webkit-transition-duration: 0;

            // &,
            // a:link, 
            // a:visited {
            //     color: @textColorDark;
            // }

            &:hover {
                border-color: @borderColorSelection;
            }

            // fade out items that are connected to the page
            // except when it is a depiction predicate
            &.item-connected:not(.item-depiction) {
                &,
                h5, h6,
                a:link, 
                a:visited {
                    color: @textColorLight;
                }
                img {
                    opacity: .3;
                }
                background-color: @backgroundColorLightest;
            }

            .z-item-text {
                @_content_height: @_heigth - 2 * @_padding - 2; // subtract border too
                // position: absolute;
                left: @_padding;
                top: @_padding;
                margin-right: @_padding;
                // height: @_content_height;
                // max-height: @_content_height;
                // overflow: hidden;
            }

            img + .z-item-text {
                left: @_padding + @thumbImageWidth + @_contentMargin;
            }

            img {
                padding: 0;
                #3L > .border-radius(0);
                #3L > .box-shadow(none);
                margin: 0 @_contentMargin 0 0;
            }

            h5, h6, p {
                font-size: @_fontSize;
                line-height: @_lineHeight;
                font-weight: normal;
                margin: 0;
            }
            h5, h6 {
                &:extend(.admin-word-break);
            }
            h5 {
                font-weight: bold;
                margin-bottom: 2px;
            }
            h6 {
                text-transform: lowercase;
                color: @gray-light;
            }
            // p {
            //     max-height: 2 * @_lineHeight;
            //     overflow: hidden;
            // }

            .rsc-actions {
                text-align: right;
            }
        }
    }

}
